<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE HTML PUBLIC "" "">
<f:view xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:w="http://www.apusic.com/jsf/widget" xmlns:layout="http://www.apusic.com/jsf/layout"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:ajax="http://www.apusic.com/jsf/ajax"
	xmlns:om="http://www.apusic.com/jsf/misc" renderKitId="AJAX" xmlns:epm="http://www.bp.com.cn/epm">
	<w:head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<w:stylesheet src="/css/kmp4.css" type="text/css"></w:stylesheet>
		<w:script src="/javascript/k4.js" type="text/javascript" language="UTF-8"></w:script>
		<script>
		   function deleteConfirm(){
			if(securityRoleGridJsvar.getSelections().length == 0){
				alert("请选择一条记录！");
				return false;
			}
			return showConfirm('你确定要删除吗？');
		}
			function freshme(){
	 		var store=securityRoleGridJsvar.getStore();
			store.reload(store.lastOptions);
	 	}	
	 	function clear(){
	 	roleDisplayNameJsvar.setValue('');
	 	}
		</script>
	</w:head>
	<w:page title="角色一览">
		<layout:panel border="false" autoHeight="true" autoWidth="true" header="false"
			styleClass="k4-view">
			<layout:panel id="viewtoolbar" border="false" autoHeight="true" autoWidth="true">
				<w:form>
					<w:toolBar>
						<w:button label="编辑"
							image="#{facesContext.externalContext.requestContextPath}/images/edit.gif"
							id="editSecurityRole" />
						<w:separator />
						<w:button label="删除"
							image="#{facesContext.externalContext.requestContextPath}/images/delete.gif"
							id="deleteSecurityRole" onclick="return deleteConfirm();" />
					</w:toolBar>
				</w:form>
			</layout:panel>
			<layout:panel title="搜索条件" border="false" autoHeight="true" autoWidth="true" collapsible="true"
				collapsed="false" styleClass="k4-view-search">
				<w:form>
					<layout:panelGrid columns="4" styleClass="k4-view-search" cellpadding="0" cellspacing="0"
						border="1">
						<layout:cell styleClass="k4-form-fieldtitle">
							<h:outputLabel value="角色名称" for="keywords" />
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldvalue">
							<w:textField width="216" id="roleDisplayName" requiredTrim="true"
								jsvar="roleDisplayNameJsvar"></w:textField>
						</layout:cell>
						<layout:cell colspan="2" styleClass="k4-form-fieldvalue">
							<layout:panelGrid columns="2" cellpadding="0" cellspacing="0">
								<w:button id="query" value="搜索"
									image="#{facesContext.externalContext.requestContextPath}/images/search.gif" />
								<w:button id="reset" value="重置"
									image="#{facesContext.externalContext.requestContextPath}/images/clear.gif"
									immediate="true" onclick="clear();" />
							</layout:panelGrid>
						</layout:cell>
					</layout:panelGrid>
				</w:form>
			</layout:panel>
			<w:dataGrid id="securityRoleGrid" toolBarPosition="bottom" rows="15" paged="true" border="false"
				showRowNumber="true" styleClass="k4-view-datagrid" autoHeight="true"
				jsvar="securityRoleGridJsvar" singleSelect="true">
				<ajax:action event="ondblclick"
					action="#{system_securityRoleListBean.showSecurityRole}" />
				<w:outputColumn id="rolename" header="角色代码" width="180"></w:outputColumn>
				<w:outputColumn id="displayName" header="角色名称" width="120"></w:outputColumn>
				<w:outputColumn id="description" header="角色描述" width="400"></w:outputColumn>
				<w:pagingToolbar for="securityRoleGrid" displayInfo="true" displayMsg="显示 {0} - {1}，共 {2} 条" />
			</w:dataGrid>
		</layout:panel>
	</w:page>
</f:view>